package com.api.component;

import java.util.Date;

import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.stereotype.Component;

@Component
public class DateComponent {

	private static String yyyyMMdd = "yyyyMMdd";
	private static String yyyyMMdd_one = "yyyy-MM-dd";
	private static String yyyyMMddHHmmss = "yyyyMMddHHmmss";
	private static String yyyyMMddHHmmss_one = "yyyy-MM-dd HH:mm:ss";
	private static String yyyyMMddHHmmssSSS = "yyyyMMddHHmmss.SSS";
	private static String yyyyMMddHHmmssSSS_one = "yyyy-MM-dd HH:mm:ss.SSS";

	public String getDateyyyyMMdd() {
		return DateFormatUtils.format(new Date(), yyyyMMdd);
	}

	public String getDateyyyyMMddOne() {
		return DateFormatUtils.format(new Date(), yyyyMMdd_one);
	}

	public String getDateyyyyMMddHHmmss() {
		return DateFormatUtils.format(new Date(), yyyyMMddHHmmss);
	}

	public String getDateyyyyMMddHHmmssOne() {
		return DateFormatUtils.format(new Date(), yyyyMMddHHmmss_one);
	}

	public String getDateyyyyMMddHHmmssSSS() {
		return DateFormatUtils.format(new Date(), yyyyMMddHHmmssSSS);
	}

	public String getDateyyyyMMddHHmmssSSSOne() {
		return DateFormatUtils.format(new Date(), yyyyMMddHHmmssSSS_one);
	}
}
